package fileDemo;

import java.io.*;

public class Demo11 {
    public static void main(String[] args) throws FileNotFoundException {
        String content = "Hello, World!";
        try( OutputStream outputStream=new FileOutputStream("D:/Project/java/java-biog/"  +
                "Day20250312/IO测试文件目录/测试1.txt",true)){
            outputStream.write(content.getBytes());
                outputStream.flush();//刷新输出流，确保所有数据都被写出
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
